package edu.xmut.kakamusic.adapter.mine;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.ArrayList;
import java.util.List;

import edu.xmut.kakamusic.R;
import edu.xmut.kakamusic.bean.vo.HotSongVO;

public class MineMusicAdapter extends BaseQuickAdapter<HotSongVO, BaseViewHolder> implements LoadMoreModule {


    private List<HotSongVO> list = new ArrayList<>();

    public MineMusicAdapter() {
        super(R.layout.rv_mine_music_item);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, HotSongVO hotSongVO) {
        baseViewHolder.setText(R.id.tv_music_song_artist, hotSongVO.getAl().getName())
                .setText(R.id.tv_music_song_name, hotSongVO.getName())
                .setText(R.id.tv_music_song_album, hotSongVO.getAr().get(0).getName())
                .setText(R.id.tv_music_serial_number, String.valueOf(baseViewHolder.getLayoutPosition() + 1));
    }

}
